package copyengine.ai.pathFinder.astart.node
{
	import copyengine.ai.pathFinder.astart.CEAStartPathFinderConfig;
	import copyengine.ai.pathFinder.astart.parentTile.CEAStartSearchParentNode;
	import copyengine.utils.UUIDFactory;

	public class CEAStartNodeBasic
	{
		private var uuid:String;

		private var referenceTarget:Object;

		private var neighborTileVector:Vector.<CEAStartSearchParentNode>;

		public function CEAStartNodeBasic()
		{
			neighborTileVector = new Vector.<CEAStartSearchParentNode>();
			uuid = UUIDFactory.instance.generateUUID();
		}

		public final function addNeighborTile(_neighborTile:CEAStartSearchParentNode):void
		{
			neighborTileVector.push(_neighborTile);
		}

		public final function setReferenceTarget(_target:Object):void
		{
			referenceTarget = _target;
		}

		public final function getReferenceTarget():Object
		{
			return referenceTarget;
		}

		/**
		 * 取得和当前节点相连接节点
		 */
		public final function getNeighborsTileVector():Vector.<CEAStartSearchParentNode>
		{
			return neighborTileVector;
		}

		public function getMoveCost():int
		{
			return 1;
		}

		public function getNodeType():int
		{
			return CEAStartPathFinderConfig.NODE_TYPE_BASIC;
		}

		public final function getUUID():String
		{
			return uuid;
		}

		public function toString():String
		{
			return "-->CEAStartNodeBasic(uuid: " + uuid + " )";
		}

	}
}
